package com.kaikai.edu.client;

import com.kaikai.commonutils.R;
import com.kaikai.edu.client.impl.VodClientImpl;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

//指定从哪个服务中调用功能 ，名称与被调用的服务名保持一致。
@FeignClient(name = "service-vod",fallback = VodClientImpl.class)
@Component
public interface VodClient {
    @DeleteMapping("/eduvod/{videoId}")
    public R removeVideo(@PathVariable("videoId") String videoId);
    @DeleteMapping("/eduvod/removeVideos")
    public R removeVideos(@RequestParam("videoList") List<String> videoList);

}
